﻿<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="images/style.css" type="text/css" rel="stylesheet">
    <meta content="MSHTML 6.00.3790.0" name="GENERATOR">
    <style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
</head>
<body style="font-size: 12px; v-text-align: center" leftmargin="0" topmargin="3"
    align="center" marginheight="0" marginwidth="0">
    <script language="javascript">
        function MakeHTML(id)
        { window.open("make_html_movie.asp?type=page&id=" + id, "", "width=150,height=20,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no"); }
        function CheckAll(form) {
            for (var i = 0; i < form.elements.length; i++) {
                var e = form.elements[i];
                //		if (e.name != 'chkall')
                e.checked = true// form.chkall.checked;
            }
        }
    </script>
    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"
        style='margin-bottom: 5px'>
        <tr class="hback">
            <td bgcolor="e1e1e1" class="xingmu">
                <strong>采集到的漫画数据搜索</strong>
            </td>
        </tr>
        <form name="form" method="post" action="cjzj_manage.asp">
        <tr>
            <td height="18" bgcolor="#FFFFFF" class="hback">
                搜索：
                <input name="keyword" type="text" id="keyword" size="40">
                <input name="Submit3" type="submit" class="Submit" value="搜索">
            </td>
        </tr>
        </form>
    </table>
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <form action="cj_zj.asp" method="post" name="cj">
        <tr>
            <td width="4%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">ID</font></div>
            </td>
            <td width="4%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">选择</font></div>
            </td>
            <td width="30%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">章节名称</font></div>
            </td>
            <td width="16%" bgcolor="e7e7e7">
                <div align="center">
                    漫画名称</div>
            </td>
            <td width="39%" bgcolor="e7e7e7">
                <div align="center">
                    采集</div>
            </td>
            <td width="7%" bgcolor="e7e7e7">
                <div align="center">
                    <font color="#000000">操作</font></div>
            </td>
        </tr>
        <%
     MaxPerPage=100
   if not isempty(request("page")) then 
      currentPage=cint(request("page")) 
   else 
      currentPage=1 
   end if 
if request("cjwebid")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " cjwebid = '" & request("cjwebid") & "' "
end if
if request("comicid")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " comicid = '" & request("comicid") & "' "
end if
if request("cjcomicid")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " cjcomicid = '" & request("cjcomicid") & "' "
end if
if request("keyword")<>"" then
	if search="" then
		search = search & " WHERE "
	else
		search = search & " AND "
	end if
	search = search & " zjmc like '%" & trim(request("keyword")) & "%' "
end if
set rs=server.createobject("adodb.recordset")
'sql="select * from zjlog " & search &""
sql="select * from zjlog where Exists(select * from zj where cjitemid <> zjlog.id)"


rs.open sql,conn,1,1
allshu=rs.recordcount
if allshu<=0 then%>
        <tr bgcolor="#FFFFFF">
            <td height="40" colspan="6">
                <div align="center" class="STYLE1">
                    没有采集章节 <a href="cj_comic.asp?cjid=<%=request("cjcomicid")%>">现在采集</a>
                </div>
            </td>
        </tr>
        <%
else
rs.pagesize=MaxPerPage 
mpage=rs.pagecount     
rs.move  (currentPage-1)*MaxPerPage
i=0
do while not rs.eof
id=rs("id")

        %>
        <tr>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%=id%></div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%set rs2=server.createobject("adodb.recordset")
sql2="select * from zj where cjitemid ='"&rs("id")&"'"
rs2.open sql2,conn,1,1
if not rs2.eof then%>
                    <input name="id" type="checkbox" disabled value="<%=rs("id")%>"><%
rs2.close
else%>
                    <input type="checkbox" name="id" value="<%=rs("id")%>"><%end if%>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <%=rs("zjmc")%>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%set rs2=server.createobject("adodb.recordset")
sql2="select * from cjlog where id='"&rs("cjcomicid")&"'"
rs2.open sql2,conn,1,1
if rs2.eof then%>
                    无
                    <%
else
mhmc=rs2("mcmc")
                    %>
                    <a href="?cjcomicid=<%=rs("cjcomicid")%>">
                        <%=mhmc%></a><%end if
rs2.close
                        %>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%set rs2=server.createobject("adodb.recordset")
sql2="select * from zj where cjitemid ='"&rs("id")&"'"
rs2.open sql2,conn,1,1
if not rs2.eof then%>
                    <font color="red">已采集</font>
                    <%
rs2.close
else%>
                    <a href="cj_comic_zj.asp?id=<%=rs("id")%>">采集</a>
                    <%end if%>
                </div>
            </td>
            <td bgcolor="#FFFFFF">
                <div align="center">
                    <%set rs2=server.createobject("adodb.recordset")
sql2="select * from zj where cjitemid ='"&rs("id")&"'"
rs2.open sql2,conn,1,1
if not rs2.eof then%>
                    <a href="#" onclick="alert('已采集入库的数据不能删除')">删除</a>
                    <%
rs2.close
else%>
                    <a href="cj_zj.asp?id=<%=id%>&act=全部删除" onclick="{if(confirm('确定删除此内容吗!?')){return true;}return false;}">
                        删除</a><%end if%>
                </div>
            </td>
        </tr>
        <%i=i+1  
if i>=MaxPerPage then exit do
 rs.movenext
 loop
 end if %>
        <tr>
            <td colspan="6" bgcolor="#FFFFFF">
                <input name='chkall' type="button" class="Submit" onclick='CheckAll(this.form)' value="全选">
                <input name="act" type="submit" class="Submit" id="act" title="删除选定记录" onclick="{if(confirm('加入采集项目!?')){this.document.dj.submit();return true;}return false;}"
                    value="全部删除">
                <input name="act" type="submit" class="Submit" id="act" title="加入采集项目" onclick="{if(confirm('加入采集项目!?')){this.document.dj.submit();return true;}return false;}"
                    value="加入采集项目">
                &nbsp;页次：<b><font color="ff0000">
                    <%=currentPage%>
                </font></b>/<b>
                    <%=mpage%>
                </b>&nbsp;每页&nbsp;<b><font color="ff0000">
                    <%=MaxPerPage%>
                </font></b>内容数&nbsp;<b><font color="ff0000">
                    <%=allshu%>
                </font></b>
                <%pageno=currentPage  
		if cint(pageno)>1 then%>
                <a href="cjzj_manage.asp?page=1&comicid=<%=request("comicid")%>&cjcomicid=<%=request("cjcomicid")%>&cjwebid=<%=request("cjwebid")%>"
                    title="最前页">
                    <%end if%>
                    <font face="Webdings">9</font></a>
                <% if cint(pageno)>1 then%>
                <a href="cjzj_manage.asp?page=<%=currentPage-1%>&comicid=<%=request("comicid")%>&cjcomicid=<%=request("cjcomicid")%>&cjwebid=<%=request("cjwebid")%>"
                    title="上一页">
                    <%end if%>
                    <font face="Webdings">7</font></a>
                <%pp=cint(pageno)-2            
  if pp<1 then            
  pp=1            
  end if            
p=0
for pno=pp to mpage
p=p+1
if pno*1=cint(pageno)*1 then%>
                <font color="#FF0000">
                    <%=pno%></font>
                <%else%>
                <a href="cjzj_manage.asp?page=<%=pno%>&comicid=<%=request("comicid")%>&cjcomicid=<%=request("cjcomicid")%>&cjwebid=<%=request("cjwebid")%>"
                    title="第<%=pno%>页">
                    <%=pno%></a>
                <%end if%>
                <%if p>=5 then exit for            
next%>
                <% if cint(pageno)< mpage then%>
                &nbsp;<a href="cjzj_manage.asp?page=<%=currentPage+1%>&comicid=<%=request("comicid")%>&cjcomicid=<%=request("cjcomicid")%>"
                    title="下一页"><%end if%><font face="Webdings">8</font></a>&nbsp;
                <% if cint(pageno)< mpage then%>
                <a href="cjzj_manage.asp?page=<%=mpage%>&comicid=<%=request("comicid")%>&cjcomicid=<%=request("cjcomicid")%>&cjwebid=<%=request("cjwebid")%>"
                    title="最后页">
                    <%end if%><font face="Webdings">:</font></a>&nbsp;&nbsp;<select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value"><script> var total_page=<%=mpage%>;var cur_page=<%=currentPage%>;for (i=1;i<=total_page;i++){  if (i == cur_page) {    document.write("<option selected value=cjzj_manage.asp?comicid=<%=request("comicid")%>&cjcomicid=<%=request("cjcomicid")%>&cjwebid=<%=request("cjwebid")%>&page="+i+">"+i+"</option>");  } else{    document.write("<option  value=cjzj_manage.asp?cjid=<%=request("cjid")%>&cjcomicid=<%=request("cjcomicid")%>&cjwebid=<%=request("cjwebid")%>&page="+i+">"+i+"</option>");  }}</script></select>
            </td>
        </tr>
        </form>
    </table>
</body>
</html>
